import socket

client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

client.connect(("127.0.0.1",60000))

with open("C:\\Users\\11018\\Desktop\\d.png","rb") as f:
    result = f.read()
    client.send(result)
    client.close()